package com.alibaba.citrus.ots.b2b.trade.order.api;

import com.alibaba.citrus.ots.b2b.trade.order.dto.request.SaveSaleOrderRequest;
import com.alibaba.citrus.ots.b2b.trade.order.dto.request.ModifyOrderRequest;
import com.alibaba.citrus.ots.b2b.trade.order.dto.request.UpdateOrderRequest;
import com.alibaba.citrus.ots.b2b.trade.order.dto.response.BatchCreateOrderResponse;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;

import java.util.List;

/**
 * 销售订单写服务
 * @author DJL
 */
@MeshFlowService(apps = {"bc_ots"}, name = "销售订单写服务")
public interface OrderWriteService {

    /**
     * 保存销售订单
     * @param request
     * @return
     */
    Result<List<BatchCreateOrderResponse>> saveSaleOrder(SaveSaleOrderRequest request);

    /**
     * 修改销售订单
     * @param request
     * @return
     */
    Result<Boolean> modifySaleOrder(ModifyOrderRequest request);

    /**
     * 取消销售订单
     * @param request
     * @return
     */
    Result<Boolean> cancelOrder(UpdateOrderRequest request);

    /**
     * 提交销售订单
     * @param request
     * @return
     */
    Result<Boolean> submitSaleOrder(UpdateOrderRequest request);

    /**
     * SAP回调接口
     * @param request
     * @return
     */
    Result<Boolean> sapCallBack(ModifyOrderRequest request);
}
